package cn.sc.summer.auth.token;

import cn.sc.summer.token.base.BaseLoginToken;
import cn.sc.summer.token.enums.LoginTypeEnum;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

/**
 * 类名：手机号+短信验证码登录
 *
 * @author a-xin
 * @date 2023/11/28 14:53
 */
public class SmsCodeLoginToken extends BaseLoginToken {

    private static final long serialVersionUID = -6231962326068951783L;

    public SmsCodeLoginToken(Object principal, Object credentials) {
        super(principal, credentials);
    }

    public SmsCodeLoginToken(Object principal, Object credentials, Collection<? extends GrantedAuthority> authorities) {
        super(principal, credentials, authorities);
    }

    /**
     * Determine the types of data sources supported by this class
     *
     * @return Supported types
     */
    @Override
    public String supports() {
        return LoginTypeEnum.SMS_WEB.getSlogan();
    }

}
